<!DOCTYPE html>
<html lang="en" th:replace="layout/base :: layout(~{::main},${article.title})" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div th:fragment="main" class="container xl:w-4/5 mx-auto py-4 flex flex-row items-start  gap-2 "
     style="min-height:500px">
    <div class="left w-1/5 bg-gray-300 p-2" th:insert="~{blog/sidebar :: sidebar}">

    </div>
    <div class="right w-4/5" th:if="${article}">
        <h1 th:text="${article.title}" class="text-3xl"></h1>
        <div>
            <div th:each="tag : ${article.tags}" class="inline-block bg-gray-300 text-white px-2">
                <span th:text="${tag.refTag.name}"></span>
            </div>
        </div>

        <div class="text-gray-400">
            <span th:text="'发布时间:' + ${article.created}"></span>
            <span th:text="'更新时间:' + ${article.updated}"></span>
        </div>


        <div class="mt-4" th:utext="${article.content} ?: '没有添加内容~'"></div>


        <div class="my-4">
            <p th:text="${article.description} ?: '没有简介~'">...</p>

            <div>
                <span th:text="${article.ext}"></span>
            </div>
            <div>
                <span th:text="${article.config} ? ${article.config.toJson} : '没有配置内容'"></span>
            </div>
        </div>
    </div>
    <div th:if="!${article}">
        not found
    </div>
</div>
</body>
</html>